import React from 'react';
import { connect } from 'dva';
import { Card, Steps, Button } from 'antd';
import router from 'umi/router';
import PageHeaderWrapper from '@/components/PageHeaderWrapper';
import Result from '@/components/Result';

const { Step } = Steps;

@connect()
class SelectSteps extends React.Component {
  constructor(props) {
    super(props);
    this.state = {};
  }

  componentDidMount() {}

  render() {
    const { dispatch } = this.props;
    return (
      <PageHeaderWrapper>
        <Card>
          <Steps current={2} style={{ marginBottom: 70 }}>
            <Step title="选择产品" />
            <Step title="设置价格" />
            <Step title="完成" />
          </Steps>
          <Result type="success" title="操作成功" />
          <div style={{ marginTop: '50px', marginBottom: '30px', textAlign: 'center' }}>
            <Button
              style={{ marginRight: '30px' }}
              size="large"
              onClick={() => {
                dispatch({
                  type: 'quosetprice/updateModelData',
                  payload: {
                    isGoBack: true,
                  },
                });
                router.push('/salemanage/quotation/add');
              }}
            >
              继续操作
            </Button>
            <Button
              type="primary"
              size="large"
              onClick={() => router.push('/salemanage/quotation/index')}
            >
              完成
            </Button>
          </div>
        </Card>
      </PageHeaderWrapper>
    );
  }
}
export default SelectSteps;
